/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package util.www.jdbc;

/**
 *
 * @author Rdelacruz
 */
public class JdbcProperties {
    private String url;
    private String driver;
    private String username;
    private String password;
    
    public String getUrlCompleta() {
        //URL="jdbc:sqlserver://localhost:1433;databaseName=enaho;user=sa;password=12345;"
        StringBuilder sb = new StringBuilder();
        sb.append(url);
        if(username!=null) {
            sb.append(";user=");
            sb.append(username);
        }
        if(password!=null) {
            sb.append(";password=");
            sb.append(password);
        }            
        return sb.toString();
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    
}
